package 面向对象初级.方法.课堂练习;

public class Person {
    String name;
    int age;
    int sex;

    public void study(){
        System.out.println("studting");
    }

    public void showAge(){
        System.out.println(age);
    }

    public int addAge(int i){
        return i+2;
    }
}
class  PersonTest{
    public static void main(String[] args) {
        Person person1 = new Person();
        person1.study();
        person1.showAge();
        int age=person1.addAge(20);
        System.out.println(age);
    }
}
